<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>攻击信息</title>
<link href="/back/css/style.css" rel="stylesheet" type="text/css" />
<link href="/back/css/select.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="formbody">
    <div class="formtitle"><span>基本信息</span></div>
    	<form id = "from">
		    <ul class="forminfo">
			    <li><label>请求格式</label>
			    	<div class="vocation">
					    <select class="select3" name="getOrPost">
						    <option value="GET">GET</option>
						    <option value="POST">POST</option>
					    </select>
				    </div>
			    </li>
			    <li><label>请求地址<b>*</b></label>
			    <div class="vocation">
				    <select class="select3" name="http_s">
					    <option value="http://">http://</option>
					    <option value="https://" >https://</option>
				    </select>
			    </div>
			    <input id="url" name="url" type="text" class="dfinput" value="" /><i>请输入有效地址</i></li>
			    <li><label>线程次数</label><input id="threadNumber" name="threadNumber" type="text" class="dfinput" value="" /><i>总共创建线程次数5000以下</i></li>
			    <li><label>单线程次数</label><input id="number" name="number" type="text" class="dfinput" value="" /><i>每个线程 请求地址的次数</i></li>
			    <li><label>&nbsp;</label><input type="button" class="btn" value="确认" onclick="chek();" /></li>
		    </ul>
	    </form>
    </div>
    <script src="/back/js/jquery.js" language="JavaScript" ></script>
    <script type="text/javascript" src="/back/js/select-ui.min.js"></script>
    
	<!-- 弹窗js -->
    <script src="/back/js/layer/layer.js"></script>
    <script src="/back/js/base.js"></script>
    <script type="text/javascript">
	    $(document).ready(function(e) {
			$(".select3").uedSelect({
				width : 100
			});
		});
    
		function chek(){
			var parameter = ["url","threadNumber","number"];
			var type = [null,"Digit","Digit"];
			var msg = ["请输入地址！"];
			if(validation(parameter,type,msg)){
				var index = layer.load(2, {
					shade: [0.3,'#787878'] //0.1透明度的白色背景
				});
				$.post('/adminBack/attack/addAttack',$('#from').serialize(),function(reds){
					layer.close(index); 
					layer.alert(reds.msg);
				},'json');
			}
		}
	</script>
</body>
</html>
